package com.big.app.controller;


import com.big.app.service.intf.CollectionService;
import com.big.app.vo.R;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: zjl
 * @description
 * @date: 2022/4/21 23:29
 */
@RestController
@RequestMapping("/api/collection/")
@Api(value = "实现我的收藏相关操作",tags = "实现我的收藏相关操作")
@CrossOrigin
public class CollectionController {
    @Autowired
    private CollectionService collectionService;
    @GetMapping("insert.do")
    public R insert(Integer mid, Integer cactive){return collectionService.insert(mid,cactive);}
    @GetMapping("update.do")
    public R updateZactive(Integer mid,Integer cactive){return collectionService.updateCactive(mid,cactive);}
    @GetMapping("selectFlag.do")
    public R selectFlag(Integer mid){return collectionService.selectAll(mid);}
    @GetMapping("all.do")
    public R all(){return collectionService.All();}
}
